package com.cskaoyan.mall.model.orders;

import com.cskaoyan.mall.model.goods.Spec;

import java.sql.Time;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: jyf2000jyf
 */
public class OrderByIdVO {
    private Integer id;
    private Double amount;
    private Integer num;
    private Integer goodsDetailId;
    private Integer state;
    private String goods;
    private List<State> states = new ArrayList<>();
    private List<Spec> spec;
    private Time time;

    private Integer currentState;
    private Integer currentSpec;
    private Current curState;
    private Current curSpec;


    public OrderByIdVO() {
    }

    public OrderByIdVO(Integer id, Double amount, Integer num, Integer goodsDetailId, Integer state, String goods, List<State> states, List<Spec> spec, Current curState, Current curSpec, Time time) {
        this.id = id;
        this.amount = amount;
        this.num = num;
        this.goodsDetailId = goodsDetailId;
        this.state = state;
        this.goods = goods;
        this.states = states;
        this.spec = spec;
        this.curState = curState;
        this.curSpec = curSpec;
        this.time = time;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public void setStates() {
        states.add(new State(0, "未付款"));
        states.add(new State(1, "未发货"));
        states.add(new State(2, "已发货"));
        states.add(new State(3, "已完成订单"));
    }

    public List<Spec> getSpec() {
        return spec;
    }

    public void setSpec(List<Spec> spec) {
        this.spec = spec;
    }

    public Time getTime() {
        return time;
    }

    public void setTime(Time time) {
        this.time = time;
    }

    public Integer getCurrentState() {
        return currentState;
    }

    public void setCurrentState(Integer currentState) {
        this.currentState = currentState;
    }

    public Integer getCurrentSpec() {
        return currentSpec;
    }

    public void setCurrentSpec(Integer currentSpec) {
        this.currentSpec = currentSpec;
    }

    public void initCurState() {
        this.curState = new Current(this.currentState);
        this.currentState = null;
    }

    public void initCurSpec() {
        this.curSpec = new Current(this.currentSpec);
        this.currentSpec = null;
    }
}
